import { IntersectionType, PartialType } from '@nestjs/mapped-types';
import { DeleteUserDto } from './delete.dto';
import { SignUpDto } from 'src/modules/auth/dto/sign-up.dto';
import { User } from '../entities/user.entity';
import { IsArray, IsOptional } from 'class-validator';

export class UpdateUserDto extends IntersectionType(
  PartialType(SignUpDto),
  DeleteUserDto,
) {
  @IsOptional()
  @IsArray({ message: 'roles必须是数组' })
  userRoles: User['userRoles'];
}
